<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <link rel="stylesheet" href="../libs/vue2.x/elementui/index.css">
  <link rel="stylesheet" href="./dist/FormMaking.css">
  <style >
    #app{
      padding: 0!important;
    }
    .making-form-container .el-container .el-footer{
      display: none;
    }
    .making-form-container .el-container .el-header{
      display: flex;
    }

    .making-form-container .el-container .el-header .btn-submit{
      margin-left: 50px;
    }
    .action-container{
      display: flex;
      flex: auto;
      flex-wrap: nowrap;
      align-items: center;
    }
    .action-container .el-button{

    }

    .action-container div{
      margin-right: 8px;
    }
    .action-container .left{
      flex: 1;
    }

  </style>
</head>
<body>
<div id="app">
  <fm-making-form class="making-form-container" style="height: 100vh;"
    preview
    generate-code
    generate-json
    ref="makingform">
    <template #action>
      <div class="action-container">
        <el-form ref="formBaseInfoRef"
                 :rules="formBaseInfoRules"
                 label-width="0" size="medium"
                 :inline="true" :model="baseInfo"
                 class="form-base-info">
          <el-form-item prop="modelName" style="width: 60%">
            <el-input style="width: 100%" v-model="baseInfo.modelName" placeholder="表单名称"></el-input>
          </el-form-item>
          <el-form-item prop="modelKey" style="width: 40%">
            <el-input style="width: 100%" :disabled="modelKeyDisabled" v-model="baseInfo.modelKey" placeholder="表单标识"></el-input>
          </el-form-item>
        </el-form>
<!--        <div class="left">
          <el-input ref="modelNameRef" v-model="modelName" placeholder="表单名称" size="medium"></el-input>
        </div>
        <div>
          <el-input @input="" ref="modelKeyRef" v-model="modelKey" placeholder="表单标识" size="medium"></el-input>
        </div>-->
      </div>

      <el-button class="btn-submit" @click="handleSubmit" type="text" icon="el-icon-document-checked">保存</el-button>
    </template>
  </fm-making-form>
</div>
<script src="../libs/vue2.x/vue.js"></script>
<script src="../libs/vue2.x/elementui/index.js"></script>
<script src="./dist/FormMaking.umd.min.js"></script>
<script src="./dist/editor/Editor.umd.min.js"></script>
<script src="./js/index.js"></script>

<script>
  var vueObj = new Vue();
  // CustomForm.init();
</script>
<style>
  .form-base-info{
    display: flex;
    margin-top: 11px;
    width: 100%;
  }
  .form-base-info .el-form-item{
    margin-bottom: 0;
  }
  .form-base-info .el-form-item .el-form-item__content{
    width: 100%;
  }
  .el-form-item:hover .el-form-item__error{
    display: block;
  }
  .form-base-info .el-form-item__error{
    display: none;
    border: 1px solid #fe6c6f;
    background: #fff6f7;
    z-index: 99;
    width: fit-content;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-align: left;
    padding: 10px;
    margin-top: 5px;
  }
  .form-base-info .el-form-item__error::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 0;
    width: 16px;
    height: 16px;
    box-shadow: 6px 6px 3px -5px #fe6c6f, 9px 6px 9px -9px #fe6c6f;
    -webkit-transform: rotate(-135deg);
    -webkit-transform: rotate(-135deg);
    -moz-transform: rotate(135deg);
    -ms-transform: rotate(135deg);
    -o-transform: rotate(135deg);
  }

  #app{
    margin: auto;
    padding: 20px;
  }
</style>
</body>
</html>
